import Http from '@/common/js/http'
const isMock = false
/**
 * 获取当前会话列表
 * @return {*} Promise
 */
export function conversationCurrent() {
  return Http.post('/cloudcall-business-api/conversation/current', {}, { mock: isMock })
}
/**
 * 获取历史会话列表
 * @return {*} Promise
 */
export function conversationHistory() {
  return Http.post('/cloudcall-business-api/conversation/history', {}, { mock: isMock })
}
/**
 * 右侧会话历史
 * @return {*} Promise
 */
export function conversationHistoryRight(params) {
  return Http.post('/cloudcall-business-api/conversation/historyRight', params, { mock: isMock })
}
/**
 * 右侧 media会话信息
 * @return {*} Promise
 */
export function chatMessageFindByConv(params) {
  return Http.post('/cloudcall-business-api/chatMessage/findByConv', params, { mock: isMock })
}
/**
 * 右侧 call会话记录
 * @return {*} Promise
 */
export function callRecordHistoryRight(params) {
  return Http.post('/cloudcall-business-api/callRecord/common/history/right', params, { mock: isMock })
}
/**
 * 中间--全部的会话信息
 * @return {*} Promise
 */
export function chatMessageFindByAccountNo(params) {
  return Http.post('/cloudcall-business-api/openAuth/chatMessage/findByAccountNo', params, { mock: isMock })
}
/**
 * 右侧会话信息
 * @return {*} Promise
 */
export function conversationInfo(params) {
  return Http.post('/cloudcall-business-api/conversation/info', params, { mock: isMock })
}
/**
 * 多媒体>排队用户
 * @return {*} Promise
 */
export function inqueueList(params) {
  return Http.post('/cloudcall-business-api/agentUser/inqueue/list', params, { mock: isMock })
}
/**
 * 电话>排队用户
 * @return {*} Promise
 */
export function callQueueList(params) {
  return Http.post('/cloudcall-business-api/callRecord/common/queue/list', params, { mock: isMock })
}
/**
 * 分机号
 * @return {*} Promise
 */
export function cloudcallPrepare() {
  return Http.post('/cloudcall-business-api/cloudcall/prepare', {}, { mock: isMock })
}
/**
 * 查询在线坐席
 * @return {*} Promise
 */
export function mediaOnline(params) {
  return Http.post('/cloudcall-business-api/agent/media/online', params, { mock: isMock })
}
/**
 * 文件上传
 * @return {*} Promise
 */
export function seatOssFileUrl(params) {
  return Http.post('/cloudcall-business-api/oss/file-url', params, { mock: isMock })
}
/**
 * 获取 Socket 链接地址
 * @return {*} Promise
 */
export function cloudcallLoad(params) {
  return Http.post('/cloudcall-business-api/cloudcall/load', params, { mock: isMock }).then(
    (res) => {
      return Promise.resolve(res.socketioUrl)
    }
  )
}
/**
 * 关闭多媒体会话
 * @return {*} Promise
 */
export function conversationCancel(params) {
  return Http.post('/cloudcall-media-api/conversation/media/cancel', params, { mock: isMock })
}
/**
 * 邀请会话
 * @return {*} Promise
 */
export function conversationInvite(params) {
  return Http.post('/cloudcall-media-api/conversation/media/invite', params, { mock: isMock })
}
/**
 * 转接
 * @return {*} Promise
 */
export function mediaTransfer(params) {
  return Http.post('/cloudcall-media-api/conversation/media/transfer', params, { mock: isMock })
}
// 提交满意度评价
export function evaluateCommit(params) {
  return Http.post('/cloudcall-media-api/openAuth/evaluate/commit', params, { mock: isMock })
}
// 保存添加留言
export function leaveMessageCommit(params) {
  return Http.post('/cloudcall-media-api/openAuth/leaveMessage/commit', params, { mock: isMock })
}
